var starBox = document.getElementById("star-box");
var stars = document.querySelectorAll("#star-box ul li");
var startsUl = document.querySelector("#star-box ul")
var textEle = document.getElementById('text')
var info = document.getElementById('info')

for(let i=0; i<stars.length; i++){
    stars[i].onmouseenter = function(){
        console.log(`当前分数${i}`)
        handleStar(i+1)
    }
}

function handleStar(score){
    for(let i=0;i<stars.length;i++){
        if(i<score){
            stars[i].classList.add('selected')
        }else{
            stars[i].classList.remove('selected')
        }
        
    }
    
}